home *** CD-ROM | disk | FTP | other *** search
- Path: ip-pdx14-05.teleport.com!user
- From: weld@teleport.com (J.R. Tipton)
- Newsgroups: comp.lang.c++
- Subject: Re: one character input?
- Date: Wed, 17 Apr 1996 17:04:22 -0700
- Organization: ARC
- Message-ID: <weld-1704961704220001@ip-pdx14-05.teleport.com>
- References: <3173AAF0.3515@struct.kth.se>
- NNTP-Posting-Host: ip-pdx14-05.teleport.com
-
- In article <3173AAF0.3515@struct.kth.se>, Peter Andren
- <andren@struct.kth.se> wrote:
-
- > Hello,
- >
- > I need a function to read one character from the keyboard without to end
- > the input with a returncharacter. Unfortunatly I'm not able to find this
- > funtion in my book, but I have a strong feeling that it shouldn't be so
- > difficult.
-
- In most compilers, the macro getch() works. Example:
-
- void main()
- {
- char choice;
-
- printf("Type something. ");
- choice=getch();
- ...
- };
-
- getch() is actually a macro I believe, but don't worry about that yet :)
-
- J. R. T I P T O N weld@teleport.com
- *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*
- * "I wish to paint as if no painter has painted before me." *
- * WWW Page = http://www.teleport.com/~weld *
- *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*
-